﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Msung.Core.Extensions
{
    public static class StringExtension
    {
        /// <summary>  
        /// 根据GUID获取16位的唯一字符串  
        /// </summary>  
        /// <param name="guid"></param>  
        /// <returns></returns>  
        public static int ToInt16(this string str)
        {
            int value = 0;
            if (!string.IsNullOrEmpty(str))
                int.TryParse(str, out value);

            return value;
        }
    }
}
